1. Field of the Invention
The present invention relates to a moving picture coding method, and more particularly to a technique for deriving motion vectors of a B (bi-predictive) picture.
2. Description of the Related Art
A conventional B picture has five types of predictive modes such as forward mode, backward mode, bi-directional mode, direct mode and intra mode. In the forward mode, backward mode and bi-directional mode, the directions of motion vectors can be recognized from mode names because direction information are involved in the mode names. In the direct mode, two motion vectors of both directions are derived from a motion vector of a co-located block in a neighboring picture on the basis of a temporal redundancy characteristic that motion continuity is constantly maintained between two adjacent pictures. This direct mode has an advantage in terms of coding efficiency because motion information is not sent to a decoder.
On the other hand, a B picture proposed in a next-generation moving picture compression technique such as H.264 or MPEG-4 part 10 is characterized in that the B picture is allowed to be used as a reference picture because it can be stored in a reference picture buffer. This B picture is further characterized in that it has five types of predictive modes such as list 0 mode, list 1 mode, bi-predictive mode, direct mode and intra mode.
The list 0 mode is similar to the conventional forward mode, and motion information such as a reference picture index and motion vector difference are indicated respectively by ref_idx_10 and mvd_10. The list 1 mode is also similar to the conventional backward mode, and motion information such as a reference picture index and motion vector difference are indicated respectively by ref_idx_11 and mvd_11. The bi-predictive mode has two reference pictures, both of which may be located temporally before or after the B picture, or which may be located temporally before and after the B picture, respectively. In this case, two reference picture indexes and two motion vector differences are indicated respectively by ref_idx_10, ref_idx_11, mvd_10, and mvd_11, and each reference pictures has picture order count (POC) data which is temporal location information.
In the direct mode, motion vectors are obtained by selecting any one of a spatial technique and temporal technique. The spatial direct mode technique is to derive list 0 and list 1 reference picture indexes and motion vectors from neighboring blocks of a macroblock to be coded. The temporal direct mode technique is to derive a list 0 motion vector MVF and list 1 motion vector MVB by scaling the only motion vector, a list 0 motion vector, of a co-located block in a list 1 reference picture for direct mode, which is similar to the conventional B picture. Here, the list 1 reference picture for direct mode is a P picture (hence the singe motion vector) where an index for list 1 prediction is 0, and a list 0 reference picture for direct mode is a list 0 reference picture pointed by a motion vector of a co-located block in the list 1 reference picture for direct mode.
FIGS. 1(A) to 1(C) show default indexes for list 0 prediction, default indexes for list 1 prediction and list 1 reference pictures for direct mode of respective B pictures in an IBBBP pattern when the number of available list 0 and list 1 reference pictures (or the size of a short-term buffer) is 6, respectively. Here, the default indexes for list 0 prediction and the default indexes for list 1 prediction are dependant on an output order, or POC value, of a previously decoded reference picture regardless of a decoding order. In FIG. 1, all the B pictures use a temporally following P picture as the list 1 reference picture for direct mode.
FIGS. 2(A) to 2(C) show default indexes for list 0 prediction, default indexes for list 1 prediction and list 1 reference pictures for direct mode of respective B pictures in an IBBB pattern using only the B pictures, respectively. In FIG. 2(A), when a B picture to be coded is B8, a temporally preceding B5 with a list 1 index 0 is a list 1 reference picture for direct mode. As shown FIG. 2(B), a list 1 reference picture for direct mode of B7 to be subsequently decoded is the temporally following B8. Last, as shown in FIG. 2(C), a list 1 reference picture for direct mode of B9 to be subsequently decoded is the temporally preceding B7.
In conclusion, as seen from FIGS. 1(A) to 2(C), a list 1 reference picture for direct mode may be a P or B picture temporally following a B picture to be coded, or a B picture temporally preceding it.
FIGS. 3(A) to 3(H) show modes that a co-located block in a list 1 reference picture for direct mode can have when the list 1 reference picture temporally follows a B picture. In this case, because the list 1 reference picture can be a P picture or B picture, the co-located block thereof has one or two motion vectors, or the intra mode. The next-generation moving picture compression technique, such as H.264 or MPEG-4 part 10, permits the reordering of reference picture indexes at a slice level, so an index 0 for list 1 prediction can be assigned to a picture just after a B picture. That is, since the list 1 reference picture can exist just after a B picture, a motion vector of the co-located block can be directed forward or backward.
FIGS. 4(A) to 4(H) show modes that a co-located block in a list 1 reference picture for direct mode can have when the list 1 reference picture temporally precedes a B picture. In this case, the co-located block has one or two motion vectors, or the intra mode, as described above. Other reference pictures can be present between the list 1 reference picture and the B picture, so a motion vector of the co-located block can point to temporally forward or backward direction.
As seen from FIGS. 3(A) to 4(H), the list 1 reference picture for direct mode can have various predictive modes, resulting in a need to explore a method for calculating direct mode motion vectors in consideration of such various cases.